package main

import (
	"fmt"
	"math/rand"
	"time"
)

var ints [] int = [] int {1,2,3,4,5,6,7,8}

func main() {

	//initArray(100000)



	index := -1
	for {

		v1 := ints[index+1]

		v2 := ints[index+2]

		var  tree Tree

		if (v1 - v2) < 0   {
			tree = Tree{v1,v2,-1}
		}else{
			tree = Tree{v2,v1,-1}
		}


		fmt.Println(tree)

		index+=2
		if index+1 == len(ints) {
			break
		}




	}

}

type Tree struct {

	Left   int

	Right  int

	Parent int
}



func initArray(length int) {

	ints = make([] int, length)
	rand.Seed(time.Now().UnixNano())
	for i := 0; i < length; i++ {
		ints [i] = rand.Intn(100000)
	}

}
